package com.itheima.mapper;

import com.itheima.pojo.Menu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.LinkedHashSet;

@Mapper
public interface MenuMapper {
    /**
     * 根据角色id查询菜单
     * @param id
     * @return
     */
    @Select("select * from t_menu where id in (select menu_id from t_role_menu where role_id=#{id})")
    LinkedHashSet<Menu> getMenusByRoleId(Integer id);
}
